home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / RCS / boot.mk,v < prev    next >
Encoding:
Text File  |  1992-05-18  |  19.2 KB  |  964 lines

  1. head     1.21;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.21
  10. date     92.04.13.18.33.50;  author elm;  state Exp;
  11. branches ;
  12. next     1.20;
  13.  
  14. 1.20
  15. date     92.03.13.14.22.24;  author jhh;  state Exp;
  16. branches ;
  17. next     1.19;
  18.  
  19. 1.19
  20. date     91.11.19.18.26.11;  author kupfer;  state Exp;
  21. branches ;
  22. next     1.18;
  23.  
  24. 1.18
  25. date     91.11.06.18.35.15;  author kupfer;  state Exp;
  26. branches ;
  27. next     1.17;
  28.  
  29. 1.17
  30. date     91.10.17.13.45.20;  author jhh;  state Exp;
  31. branches ;
  32. next     1.16;
  33.  
  34. 1.16
  35. date     90.11.02.10.41.30;  author jhh;  state Exp;
  36. branches ;
  37. next     1.15;
  38.  
  39. 1.15
  40. date     90.03.08.12.19.27;  author douglis;  state Exp;
  41. branches ;
  42. next     1.14;
  43.  
  44. 1.14
  45. date     90.02.27.17.43.07;  author douglis;  state Exp;
  46. branches ;
  47. next     1.13;
  48.  
  49. 1.13
  50. date     90.02.20.11.50.19;  author douglis;  state Exp;
  51. branches ;
  52. next     1.12;
  53.  
  54. 1.12
  55. date     90.02.16.11.00.29;  author shirriff;  state Exp;
  56. branches ;
  57. next     1.11;
  58.  
  59. 1.11
  60. date     90.02.15.17.02.47;  author rab;  state Exp;
  61. branches ;
  62. next     1.10;
  63.  
  64. 1.10
  65. date     90.02.15.01.03.05;  author mendel;  state Exp;
  66. branches ;
  67. next     1.9;
  68.  
  69. 1.9
  70. date     89.10.09.06.56.01;  author rab;  state Exp;
  71. branches ;
  72. next     1.8;
  73.  
  74. 1.8
  75. date     89.10.02.10.06.00;  author rab;  state Exp;
  76. branches ;
  77. next     1.7;
  78.  
  79. 1.7
  80. date     89.09.15.07.34.08;  author rab;  state Exp;
  81. branches ;
  82. next     1.6;
  83.  
  84. 1.6
  85. date     89.08.31.16.11.23;  author rab;  state Exp;
  86. branches ;
  87. next     1.5;
  88.  
  89. 1.5
  90. date     89.07.21.18.29.56;  author douglis;  state Exp;
  91. branches ;
  92. next     1.4;
  93.  
  94. 1.4
  95. date     89.07.20.17.36.28;  author mgbaker;  state Exp;
  96. branches ;
  97. next     1.3;
  98.  
  99. 1.3
  100. date     89.06.25.21.22.19;  author jhh;  state Exp;
  101. branches ;
  102. next     1.2;
  103.  
  104. 1.2
  105. date     89.06.02.11.53.54;  author brent;  state Exp;
  106. branches ;
  107. next     1.1;
  108.  
  109. 1.1
  110. date     89.06.02.09.01.37;  author brent;  state Exp;
  111. branches ;
  112. next     ;
  113.  
  114.  
  115. desc
  116. @Makefile template for boot programs.
  117. @
  118.  
  119.  
  120. 1.21
  121. log
  122. @Added support for dependency analysis on .cc (C++) files.
  123. @
  124. text
  125. @#
  126. # Makefile for boot programs in general.
  127. # This is included by Makefile.boot after $(TM).md/md.mk is included
  128. # The following variables should be defined already:
  129. #    NAME        program to be created
  130. #    OBJS        object files from which to create it
  131. #    CLEANOBJS    object files to be removed as part of "make clean"
  132. #            (need not just be object files)
  133. #    SRCS        sources for dependency generation
  134. #    TM        target machine type for object files, etc.
  135. #    TM        target machine type for object files etc.
  136. #    MACHINES    list of all target machines currently available
  137. #    INSTALLDIR    place to install program
  138. #    LINKSTART    address at which the boot program should be linked.
  139. #
  140. # Optional variables that may be defined by the invoker:
  141. #    XAFLAGS        additional flags to pass to assembler
  142. #    XCFLAGS        additional flags to pass to linker
  143. #    DEPFLAGS    additional flags to pass to makedepend
  144. #    no_targets    if defined, this file will not define all of the
  145. #            basic targets (make, make clean, etc.)
  146. #    use_version    if defined, then this file will set things up
  147. #            to include a version number that is automatically
  148. #            incremented
  149. #
  150. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.20 92/03/13 14:22:24 jhh Exp Locker: elm $
  151. #
  152.  
  153. #
  154. # The variables below should be defined in md.mk, but they are given
  155. # default values just in case md.mk doesn't exist yet.
  156. #
  157. HDRS        ?=
  158. OBJS        ?=
  159. SRCS        ?=
  160.  
  161. #
  162. # First define search paths for libraries, include files, lint libraries,
  163. # and even sources.
  164. #
  165. .PATH.h        :
  166. .PATH.h        : $(TM).md /sprite/lib/include /sprite/lib/include/$(TM).md
  167. .PATH.ln    : /sprite/lib/lint
  168. .PATH.c        :
  169. .PATH.c        : $(TM).md
  170. .PATH.s        :
  171. .PATH.s        : $(TM).md
  172.  
  173. #
  174. # Important directories. 
  175. #
  176. MISCLIBDIR    = /sprite/lib/misc
  177. BINDIR        = /sprite/cmds.$(MACHINE)
  178.  
  179. #
  180. # System programs -- assign conditionally so they may be redefined in
  181. # including makefile
  182. #
  183. AS        ?= $(BINDIR)/as
  184. CC        ?= $(BINDIR)/cc
  185. CHGRP        ?= $(BINDIR)/chgrp
  186. CHMOD        ?= $(BINDIR)/chmod
  187. CHOWN        ?= $(BINDIR)/chown
  188. CP        ?= $(BINDIR)/cp
  189. CPP        ?= $(BINDIR)/cpp -traditional -$
  190. CTAGS        ?= $(BINDIR)/ctags
  191. ECHO        ?= $(BINDIR)/echo
  192. LD        ?= $(BINDIR)/ld
  193. LINT        ?= $(BINDIR)/lint
  194. MAKEDEPEND    ?= $(BINDIR)/makedepend
  195. MKVERSION    ?= $(BINDIR)/mkversion
  196. MV        ?= $(BINDIR)/mv
  197. RM        ?= $(BINDIR)/rm
  198. SED        ?= $(BINDIR)/sed
  199. TEST            ?= $(BINDIR)/test
  200. TOUCH        ?= $(BINDIR)/touch
  201. UPDATE        ?= $(BINDIR)/update
  202.  
  203. INSTALL_PROG    ?= /sprite/admin.$(MACHINE)/makeboot
  204. #
  205. # Several variables (such as where to install) are set based on the
  206. # TYPE variable.  Of course, any of these variables can be overridden
  207. # by explicit assignments.
  208. #
  209. TYPE        ?= boot
  210. INSTALLDIR    ?= /sprite/boot
  211. TMINSTALLDIR    ?= /sprite/boot/$(TM).md
  212.  
  213. #
  214. # Figure out what stuff we'll pass to sub-makes.
  215. #
  216. PASSVARS    = 'INSTALLDIR=$(INSTALLDIR)' 'TM=$(TM)' $(.MAKEFLAGS)
  217. #ifdef        XCFLAGS
  218. PASSVARS    += 'XCFLAGS=$(XCFLAGS)'
  219. #endif
  220. #ifdef        XAFLAGS
  221. PASSVARS    += 'XAFLAGS=$(XAFLAGS)'
  222. #endif
  223. #ifdef        NOBACKUP
  224. PASSVARS    += 'NOBACKUP=$(NOBACKUP)'
  225. #endif
  226. #ifdef        BACKUPAGE
  227. PASSVARS    += 'BACKUPAGE=$(BACKUPAGE)'
  228. #endif
  229.  
  230. #
  231. # Flags. These are ones that are needed by *all* boot programs. Any other
  232. # ones should be added with the += operator in the local.mk file.
  233. # The FLAGS variables are defined with the += operator in case this file
  234. # is included after the main makefile has already defined them...
  235.  
  236. #include     <tm.mk>
  237.  
  238. XCFLAGS        ?=
  239. XAFLAGS        ?=
  240. LINTFLAGS    ?= -m$(TM)
  241. INSTALLFLAGS    ?=
  242. LDFLAGS        += -L/sprite/lib/${TM}.md
  243. AFLAGS        += $(TMAFLAGS) $(XAFLAGS)
  244. CFLAGS        += $(TMCFLAGS) $(XCFLAGS) -I.
  245.  
  246. #if !empty(TM:Mds3100) || !empty(TM:Mds5000)
  247. CFLAGS        += -I/sprite/lib/include -I/sprite/lib/include/$(TM).md
  248. AFLAGS        += $(.INCLUDES)
  249. #endif
  250.  
  251. CFLAGS        += -I../../kernel/Include/$(TM).md -I../../kernel/Include
  252.  
  253. # KERNELSTART is the absolute address at which the kernel expects to have
  254. # its code loaded.
  255. # LINKSTART is where the boot program is loaded into memory.  It has
  256. # to be loaded high enough so that the kernel image it loads does
  257. # not overwrite the boot program.  (If it does, it generally happens
  258. # as it zeros out the bss segment.  The PROM will abort with Exception 10
  259. # or something immediately after the boot program prints out the kernel sizes.)
  260. # BOOTDIR is the directory in which the boot things live.
  261. #
  262.  
  263. #if !empty(TM:Msun3)
  264. KERNELSTART    ?= 0x3fe0
  265. LINKSTART    ?= e4000
  266. #else
  267. #if !empty(TM:Msun4)
  268. KERNELSTART    ?= 0x4000
  269. LINKSTART    ?= $(KERNELSTART:S/0x/20/)
  270. #else
  271. #if !empty(TM:Mds3100) 
  272. KERNELSTART    ?= 0x80010000
  273. LINKSTART    ?= $(KERNELSTART:S/0x//)
  274. #else
  275. #if !empty(TM:Mds5000)
  276. KERNELSTART    ?= 0x80010000
  277. LINKSTART    ?= 80a00000
  278. #else
  279. #if !empty(TM:Msun4c)
  280. KERNELSTART    ?= 0x3fe0
  281. LINKSTART    ?= $(KERNELSTART:S/0x/20/)
  282. #else
  283. KERNELSTART    ?= 0x4000
  284. LINKSTART    ?= $(KERNELSTART:S/0x/b/)
  285. #endif
  286. #endif
  287. #endif
  288. #endif
  289. #endif
  290.  
  291. CFLAGS        += -DBOOT_CODE=0x$(LINKSTART) \
  292.         -DKERNEL_START=$(KERNELSTART) -DBOOTDIR=\"$(INSTALLDIR)\" \
  293.         -DSAIO_COMPAT -DBOOT_FILE=\"$(TM)\"
  294.  
  295.  
  296. #
  297. # The .INCLUDES variable already includes directories that should be
  298. # used by cc and other programs by default.  Remove them, just so that
  299. # the output looks cleaner.
  300.  
  301. CFLAGS        += $(.INCLUDES:S|^-I/sprite/lib/include$||g:S|^-I/sprite/lib/include/$(TM).md$||g)
  302.  
  303. #
  304. # Transformation rules: these have special features to place .o files
  305. # in md subdirectories, run preprocessor over .s files, etc.
  306. # There are no profile rules for boot programs because they aren't profiled.
  307. #
  308.  
  309. .c.o        :
  310.     $(RM) -f $(.TARGET)
  311.     $(CC) $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET)
  312. .s.o    :
  313. #if empty(TM:Mds3100) && empty(TM:Mds5000)
  314.     $(CPP) $(CFLAGS:M-[IDU]*) -m$(TM) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  315.     $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).pp
  316.     $(RM) -f $(.PREFIX).pp
  317. #else
  318.     $(RM) -f $(.TARGET)
  319.     $(AS) $(AFLAGS) $(.IMPSRC) -o $(.TARGET)
  320. #endif
  321.  
  322. #
  323. # The following targets are .USE rules for creating things.
  324. #
  325.  
  326. #
  327. # MAKEBOOT usage:
  328. #    <program> : <objects> <libraries> MAKEBOOT
  329. #
  330. # Similar to MAKECMD, except it doesn't create the version.[ho] files,
  331. # and the variable LINKSTART is used to define where the boot program
  332. # gets loaded.
  333. #
  334. MAKEBOOT    :  .USE -lc
  335.     rm -f $(.TARGET)
  336.     $(LD) -N -e start -T $(LINKSTART) $(CFLAGS:M-L*) $(LDFLAGS) \
  337.         -o $(.TARGET) $(.ALLSRC:N-lc:Nend.o) -lc $(.ALLSRC:Mend.o)
  338.  
  339. #
  340. # MAKEINSTALL usage:
  341. #    install :: <dependencies> MAKEINSTALL
  342. #
  343. # The program is installed in $(TMINSTALLDIR) and backed-up to
  344. # $(TMINSTALLDIR).old
  345. #
  346. #ifndef NOBACKUP
  347. BACKUP        = -b $(TMINSTALLDIR).old
  348. #ifdef BACKUPAGE
  349. BACKUP += -B $(BACKUPAGE)
  350. #endif
  351. #else
  352. BACKUP        =
  353. #endif  NOBACKUP
  354.  
  355. MAKEINSTALL    : .USE
  356.     ${RM} -f $(TMINSTALLDIR)/$(NAME)
  357.     ${INSTALL_PROG} $(TM).md/$(NAME) $(TMINSTALLDIR)/$(NAME)
  358.  
  359. #
  360. # MAKELINT usage:
  361. #    <fluff-file> : <sources to be linted> MAKELINT
  362. #
  363. # <fluff-file> is the place to store the output from the lint.
  364. #
  365. MAKELINT    : .USE
  366.     $(RM) -f $(.TARGET)
  367.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[IDU]*) $(.ALLSRC) > $(.TARGET) 2>&1
  368.  
  369. #
  370. # MAKEDEPEND usage:
  371. #    <dependency-file> : <sources> MAKEDEPEND
  372. #
  373. # Generate dependency file suitable for inclusion in future makes.
  374.  
  375. MAKEDEPEND    : .USE
  376.     @@$(TOUCH) $(DEPFILE)
  377.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -m $(TM) -w60 -f $(DEPFILE) $(.ALLSRC)
  378.     @@$(MV) -f $(DEPFILE) $(DEPFILE).tmp
  379.     @@$(SED) -e '/^#/!s|^.|$(TM).md/&|' <$(DEPFILE).tmp > $(DEPFILE)
  380.     @@$(RM) -f $(DEPFILE).tmp
  381.  
  382. #if !defined(no_targets) && defined(NAME)
  383. #
  384. # We should define the main targets (make, make install, etc.).  See the
  385. # mkmf man page for details on what these do.
  386. #
  387. LIBS            ?=
  388.  
  389. #
  390. # start.o must come first
  391. default            : $(TM).md/$(NAME)
  392. $(TM).md/$(NAME)    : $(TM).md/start.o $(OBJS:S/$(TM).md\/start.o//:S/makeBoot.o//) MAKEBOOT
  393.  
  394.  
  395. clean            :: .NOEXPORT tidy 
  396.     $(RM) -f $(TM).md/$(NAME) 
  397.  
  398. tidy            :: .NOEXPORT 
  399.     $(RM) -f $(CLEANOBJS) $(CLEANOBJS:M*.o:S/.o$/.po/g) \
  400.             y.tab.c lex.yy.c core \
  401.         $(TM).md/lint \
  402.         a.out *~ $(TM).md/*~ version.h gmon.out mon.out
  403.  
  404. DEPFILE = $(TM).md/dependencies.mk
  405.  
  406. depend            : $(DEPFILE)
  407. $(DEPFILE)        ! $(SRCS:M*.c) $(SRCS:M*.s) $(SRCS:M*.cc) MAKEDEPEND
  408.  
  409.  
  410. #
  411. # For "install", a couple of tricks.  First, allow local.mk to disable
  412. # by setting no_install.  Second, use :: instead of : so that local.mk
  413. # can augment install with additional stuff.  Third, don't install if
  414. # TMINSTALLDIR isn't set.
  415. #
  416. #ifndef no_install
  417. #ifdef TMINSTALLDIR
  418. install            :: $(TM).md/$(NAME) installman MAKEINSTALL
  419. #else
  420. install            :: .SILENT
  421.     echo "Can't install $(NAME):  no install directory defined"
  422. #endif TMINSTALLDIR
  423. #endif no_install
  424.  
  425.  
  426. #if empty(MANPAGES)
  427. installman        :: .SILENT
  428.     echo "There's no man page for $(NAME).  Please write one."
  429. #elif !empty(MANPAGES:MNONE)
  430. installman        ::
  431.  
  432. #elif defined(INSTALLMAN)
  433. installman        :: .SILENT
  434.     $(UPDATE) -m 444 -l $(INSTALLMANFLAGS) $(MANPAGES) $(INSTALLMAN)
  435. #else
  436. installman        :: .SILENT
  437.     echo "Can't install man page(s): no install directory defined"
  438. #endif
  439.  
  440.  
  441. lint            : $(TM).md/lint
  442. $(TM).md/lint        : $(SRCS:M*.c) $(HDRS) $(LIBS:M-l*) MAKELINT
  443.  
  444.  
  445. mkmf            :: .SILENT
  446.     mkmf
  447.  
  448.  
  449. newtm            :: .SILENT
  450.     if $(TEST) -d $(TM).md; then
  451.         true
  452.     else
  453.         mkdir $(TM).md;
  454.         chmod 775 $(TM).md;
  455.         mkmf -m$(TM)
  456.     fi
  457.  
  458. #
  459. # No profiling for boot programs
  460. #
  461. #profile            : $(TM).md/$(NAME)$(PROFSUFFIX)
  462. #$(TM).md/$(NAME)$(PROFSUFFIX)    : $(OBJS:S/.o$/.po/g) $(LIBS:S/.a$/_p.a/g)
  463. #    $(RM) -f $(.TARGET)
  464. #    $(CC) $(CFLAGS) -pg -o $(.TARGET) $(.ALLSRC)
  465.  
  466.  
  467. tags            :: $(SRCS:M*.c) $(HDRS)
  468.     $(CTAGS) $(CTFLAGS) $(SRCS:M*.c)
  469.  
  470. #
  471. # No version header for boot programs
  472. #
  473. #version.h        :
  474. #    $(RM) -f version.h
  475. #    $(MKVERSION) > version.h
  476.  
  477. DISTOBJS    ?=
  478.  
  479. dist:
  480. #if defined(DISTDIR) && !empty(DISTDIR)
  481.     for i in Makefile local.mk $(TM).md/md.mk $(SRCS) $(HDRS) $(DISTOBJS)
  482.     do
  483.     if $(TEST) -e $${i}; then
  484.         $(UPDATE)  $${i} $(DISTDIR)/$${i} ;else true; fi
  485.     done
  486. #else
  487.     @@echo "Sorry, no distribution directory defined"
  488. #endif
  489.  
  490. #include    <all.mk>
  491.  
  492. #endif no_targets && NAME
  493.  
  494. .MAKEFLAGS    : -C        # No compatibility needed
  495.  
  496. #include    <rdist.mk>
  497. @
  498.  
  499.  
  500. 1.20
  501. log
  502. @moved the sun3 downloader up in memory a bit
  503. @
  504. text
  505. @d26 1
  506. a26 1
  507. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.19 91/11/19 18:26:11 kupfer Exp Locker: jhh $
  508. d283 1
  509. a283 1
  510. $(DEPFILE)        ! $(SRCS:M*.c) $(SRCS:M*.s) MAKEDEPEND
  511. @
  512.  
  513.  
  514. 1.19
  515. log
  516. @makedepend doesn't like -U, so don't pass it in from CFLAGS.
  517. @
  518. text
  519. @d26 1
  520. a26 1
  521. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.18 91/11/06 18:35:15 kupfer Exp Locker: kupfer $
  522. d141 1
  523. a141 1
  524. LINKSTART    ?= d4000
  525. @
  526.  
  527.  
  528. 1.18
  529. log
  530. @Pass -U flags to cpp, lint, makedepend.
  531. @
  532. text
  533. @d26 1
  534. a26 1
  535. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.17 91/10/17 13:45:20 jhh Exp Locker: kupfer $
  536. d253 1
  537. a253 1
  538.     $(MAKEDEPEND) $(CFLAGS:M-[IDU]*) -m $(TM) -w60 -f $(DEPFILE) $(.ALLSRC)
  539. @
  540.  
  541.  
  542. 1.17
  543. log
  544. @disk boot for the ds5000
  545. @
  546. text
  547. @d26 1
  548. a26 1
  549. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.16 90/11/02 10:41:30 jhh Exp Locker: jhh $
  550. d190 1
  551. a190 1
  552.     $(CPP) $(CFLAGS:M-[ID]*) -m$(TM) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  553. d243 1
  554. a243 1
  555.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(.ALLSRC) > $(.TARGET) 2>&1
  556. d253 1
  557. a253 1
  558.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -m $(TM) -w60 -f $(DEPFILE) $(.ALLSRC)
  559. @
  560.  
  561.  
  562. 1.16
  563. log
  564. @changed load address for sun3 because kernel got bigger
  565. @
  566. text
  567. @d26 1
  568. a26 1
  569. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.15 90/03/08 12:19:27 douglis Exp Locker: jhh $
  570. d122 1
  571. a122 1
  572. #if !empty(TM:Mds3100)
  573. d147 1
  574. a147 1
  575. #if !empty(TM:Mds3100)
  576. d151 4
  577. d165 1
  578. d189 1
  579. a189 1
  580. #if empty(TM:Mds3100)
  581. @
  582.  
  583.  
  584. 1.15
  585. log
  586. @changed s/ to S/
  587. @
  588. text
  589. @d26 1
  590. a26 1
  591. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.14 90/02/27 17:43:07 douglis Exp Locker: douglis $
  592. d141 1
  593. a141 1
  594. LINKSTART    ?= b4000
  595. d157 1
  596. @
  597.  
  598.  
  599. 1.14
  600. log
  601. @added support for backup age flag BACKUPAGE
  602. @
  603. text
  604. @d26 1
  605. a26 1
  606. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.13 90/02/20 11:50:19 douglis Exp Locker: douglis $
  607. d145 1
  608. a145 1
  609. LINKSTART    ?= $(KERNELSTART:s/0x/20/)
  610. d149 1
  611. a149 1
  612. LINKSTART    ?= $(KERNELSTART:s/0x//)
  613. d153 1
  614. a153 1
  615. LINKSTART    ?= $(KERNELSTART:s/0x/20/)
  616. d156 1
  617. a156 1
  618. LINKSTART    ?= $(KERNELSTART:s/0x/b/)
  619. d262 1
  620. a262 1
  621. $(TM).md/$(NAME)    : $(TM).md/start.o $(OBJS:s/$(TM).md\/start.o//:s/makeBoot.o//) MAKEBOOT
  622. @
  623.  
  624.  
  625. 1.13
  626. log
  627. @tried to add some consistency to ::/: operators, and fixed tve's TYPE==personal complaint
  628. @
  629. text
  630. @d26 1
  631. a26 1
  632. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.12 90/02/16 11:00:29 shirriff Exp Locker: douglis $
  633. d102 3
  634. d218 3
  635. @
  636.  
  637.  
  638. 1.12
  639. log
  640. @Fixed includes, assembler for ds3100.
  641. @
  642. text
  643. @d26 1
  644. a26 1
  645. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.11 90/02/15 17:02:47 rab Exp Locker: shirriff $
  646. d208 1
  647. a208 1
  648. #    install : <dependencies> MAKEINSTALL
  649. @
  650.  
  651.  
  652. 1.11
  653. log
  654. @Fixed distribution stuff.
  655. @
  656. text
  657. @d26 1
  658. a26 1
  659. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.10 90/02/15 01:03:05 mendel Exp Locker: rab $
  660. d117 1
  661. a117 2
  662. CFLAGS        += $(TMCFLAGS) $(XCFLAGS) -I. \
  663.         -I../../kernel/Include/$(TM).md -I../../kernel/Include
  664. d119 7
  665. d144 4
  666. d180 1
  667. d184 4
  668. d314 1
  669. a314 1
  670.     if test -d $(TM).md; then
  671. @
  672.  
  673.  
  674. 1.10
  675. log
  676. @*** empty log message ***
  677. @
  678. text
  679. @d26 1
  680. a26 1
  681. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.9 89/10/09 06:56:01 rab Exp Locker: mendel $
  682. d61 4
  683. a65 2
  684. LD        ?= $(BINDIR)/ld
  685. CP        ?= $(BINDIR)/cp
  686. d68 1
  687. d70 1
  688. a71 1
  689. MAKEDEPEND    ?= $(BINDIR)/makedepend
  690. d74 2
  691. d77 1
  692. a77 4
  693. SED        ?= $(BINDIR)/sed
  694. CHOWN        ?= $(BINDIR)/chown
  695. CHGRP        ?= $(BINDIR)/chgrp
  696. CHMOD        ?= $(BINDIR)/chmod
  697. d332 2
  698. a333 1
  699.     if test -e $${i}; then $(UPDATE)  $${i} $(DISTDIR)/$${i} ;else true; fi
  700. @
  701.  
  702.  
  703. 1.9
  704. log
  705. @Fixed distribution stuff.
  706. @
  707. text
  708. @d26 1
  709. a26 1
  710. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.8 89/10/02 10:06:00 rab Exp Locker: rab $
  711. d77 1
  712. d85 1
  713. a85 1
  714. TMINSTALLDIR    ?= /sprite/boot.$(TM)
  715. d113 1
  716. a113 1
  717. LDFLAGS        ?=
  718. d129 4
  719. d134 5
  720. a138 1
  721. LINKSTART    ?= $(KERNELSTART:s/0x/b/)
  722. d143 2
  723. d147 2
  724. a148 1
  725.         -DKERNEL_START=$(KERNELSTART) -DBOOTDIR=\"$(INSTALLDIR)\"
  726. d203 2
  727. a204 1
  728.     /sprite/admin.$(MACHINE)/makeboot $(TM).md/$(NAME) $(TMINSTALLDIR)/$(NAME)
  729. d243 1
  730. a243 1
  731.     $(RM) -f $(TM).md/$(NAME) $(TM).md/$(NAME)$(PROFSUFFIX)
  732. @
  733.  
  734.  
  735. 1.8
  736. log
  737. @Added Distribution stuff.
  738. @
  739. text
  740. @d26 1
  741. a26 1
  742. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.7 89/09/15 07:34:08 rab Exp Locker: rab $
  743. d317 1
  744. a317 1
  745.     if test -e $${i}; then $(UPDATE)  $${i} $(DISTDIR)/$${i} ;fi
  746. @
  747.  
  748.  
  749. 1.7
  750. log
  751. @Added -m$(TM) flag to cpp.
  752. @
  753. text
  754. @d26 1
  755. a26 1
  756. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.6 89/08/31 16:11:23 rab Exp Locker: rab $
  757. d310 12
  758. @
  759.  
  760.  
  761. 1.6
  762. log
  763. @Added -D_ASM to .s.o rule.
  764. @
  765. text
  766. @d26 1
  767. a26 1
  768. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.5 89/07/21 18:29:56 douglis Exp Locker: rab $
  769. d156 1
  770. a156 1
  771.     $(CPP) $(CFLAGS:M-[ID]*) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  772. @
  773.  
  774.  
  775. 1.5
  776. log
  777. @changed newtm to do mkmf for only the new machine type
  778. @
  779. text
  780. @d26 1
  781. a26 1
  782. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.4 89/07/20 17:36:28 mgbaker Exp Locker: douglis $
  783. d156 1
  784. a156 1
  785.     $(CPP) $(CFLAGS:M-[ID]*) -D$(TM) $(.IMPSRC) > $(.PREFIX).pp
  786. @
  787.  
  788.  
  789. 1.4
  790. log
  791. @Got rid of extra porting stuff for sun4.
  792. @
  793. text
  794. @d26 1
  795. a26 1
  796. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.3 89/06/25 21:22:19 jhh Exp Locker: mgbaker $
  797. d289 1
  798. a289 1
  799.         mkmf
  800. @
  801.  
  802.  
  803. 1.3
  804. log
  805. @added special case of end.o
  806. @
  807. text
  808. @d26 1
  809. a26 1
  810. # $Header: /sprite/lib/pmake/RCS/boot.mk,v 1.2 89/06/02 11:53:54 brent Exp Locker: jhh $
  811. a143 1
  812. #if empty(TM:Msun4)
  813. a144 3
  814. #else
  815. CFLAGS        += $(.INCLUDES)
  816. #endif
  817. @
  818.  
  819.  
  820. 1.2
  821. log
  822. @Updated to use $(TM) sub-directories
  823. @
  824. text
  825. @d26 1
  826. a26 1
  827. # $Header: command.mk,v 1.1 88/03/24 19:46:39 deboor Exp $
  828. d114 2
  829. a115 1
  830. CFLAGS        += $(TMCFLAGS) $(XCFLAGS) -I.
  831. d179 1
  832. a179 1
  833.         -o $(.TARGET) $(.ALLSRC:N-lc) -lc
  834. @
  835.  
  836.  
  837. 1.1
  838. log
  839. @Initial revision
  840. @
  841. text
  842. @d3 1
  843. d5 1
  844. a5 1
  845. #    PROGRAM        program to be created
  846. d7 2
  847. d10 3
  848. d14 1
  849. a14 1
  850. #    LINKADDR    address at which the boot program should be linked.
  851. d16 10
  852. d30 10
  853. a39 1
  854. # First define search paths for libraries, include files and lint libraries
  855. d41 2
  856. a42 2
  857. .PATH.a        : /sprite/lib /sprite/att/lib
  858. .PATH.h        : /sprite/lib/include /sprite/att/lib/include
  859. d44 4
  860. d52 2
  861. a53 2
  862. MISCLIBDIR    = /sprite/src/lib/misc
  863. BINDIR        = /sprite/cmds
  864. d61 1
  865. a61 1
  866. CPP        ?= /sprite/lib/cpp
  867. a65 1
  868. INSTALL        ?= $(BINDIR)/install
  869. d68 1
  870. d71 2
  871. d78 25
  872. a102 2
  873. # Flags. These are ones that are needed by *all* programs. Any other
  874. # ones should be added with the += operator in the command-specific makefile.
  875. d105 6
  876. a110 6
  877. #
  878. CCFLAGS        ?=
  879. CAFLAGS        ?=
  880. AFLAGS        += -m68010 $(CAFLAGS)
  881. CFLAGS        += -m68010 -I. $(.INCLUDES) $(.LIBS) $(CCFLAGS)
  882. LINTFLAGS    ?=
  883. d113 35
  884. d150 3
  885. a152 4
  886. # Special transformations to take care of anti-social umask's by removing any
  887. # existing object file first. If NO.C.O is defined, however, this rule isn't
  888. # used and one is assumed to be in the including makefile. Similarly for
  889. # NO.S.O and assembler source files.
  890. d154 1
  891. a154 1
  892. #ifndef NO.C.O
  893. d157 5
  894. a161 10
  895.     $(CC) $(CFLAGS) -c $(.IMPSRC)
  896. #endif NO.C.O
  897.  
  898. #ifndef NO.S.O
  899. .s.o        :
  900.     $(RM) -f $(.TARGET)
  901.     $(CPP) $(CFLAGS:M-[ID]*) $(.IMPSRC) > $$$$.s
  902.     $(AS) $(AFLAGS) -o $(.TARGET) $$$$.s
  903.     $(RM) -f $$$$.s
  904. #endif NO.S.O
  905. d171 3
  906. a173 1
  907. # Similar to MAKECMD, except it doesn't create the version.[ho] files.
  908. d178 1
  909. a178 1
  910.         -o $(.TARGET) $(.ALLSRC) -lc
  911. d182 1
  912. a182 1
  913. #    install : <files to install> MAKEINSTALL
  914. d184 2
  915. a185 1
  916. # The sources are installed in $(INSTALLDIR) and backed-up to $(INSTALLDIR).old
  917. d188 1
  918. a188 1
  919. BACKUP        = -b $(INSTALLDIR).old
  920. d192 1
  921. d194 1
  922. a194 2
  923.     $(INSTALL) -s -m 775 -o root $(BACKUP) \
  924.         $(INSTALLFLAGS) $(.ALLSRC) $(INSTALLDIR)
  925. d207 45
  926. a251 3
  927. # To keep -lc from being passed to cc when the MAKECMD and MAKECMDNOVERS
  928. # rules are used, we mark -lc as being INVISIBLE. Note we also make sure
  929. # pmake doesn't think it's the main target by marking it NOTMAIN as well.
  930. d253 62
  931. a314 25
  932. -lc    : .NOTMAIN .INVISIBLE
  933.  
  934. #ifdef define_targets && PROGRAM
  935. #
  936. # We should define the main targets.
  937. #
  938. LIBS        ?=
  939.  
  940. $(PROGRAM)    : $(OBJS) $(LIBS) MAKEBOOT
  941. install        :: $(PROGRAM) MAKEINSTALL
  942. lint        : $(SRCS) MAKELINT
  943. #endif define_targets && PROGRAM
  944.  
  945. #
  946. # Make sure CLEANOBJS and PROGRAM are defined and create the "clean" rule.
  947. #
  948. CLEANOBJS    ?=
  949. PROGRAM        ?=
  950.  
  951. clean        :: .NOTMAIN tidy
  952.     $(RM) -f $(PROGRAM)
  953.  
  954. tidy        :: .NOTMAIN
  955.     $(RM) -f $(CLEANOBJS) y.tab.c lex.yy.c core a.out *~ \
  956.         version.h version.o
  957. d316 1
  958. a316 1
  959. mkmf makemake    :: .NOTMAIN    # Does nothing. Says nothing
  960. a319 2
  961. DEPFILE        ?= $(MAKEFILE)
  962. #include    <makedepend.mk>
  963. @
  964.